<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="box">
			<div id="box1">
				<div id="ipts">
					1.文本：<input type="text" name="ipt1" id="ipt1" placeholder="请输入内容" /><br /><br />
					2.密码：<input type="password" name="ipt2" id="ipt2" placeholder="请输入密码"/><br /><br />
					3.颜色：<input type="color" name="ipt3" id="ipt3"  /><br /><br />
					4.日期：<input type="date" name="ipt4" id="ipt4"/><br /><br />
					5.日期+时间：<input type="datetime-local" name="ipt5" id="ipt5"/><br /><br />
					6.月份：<input type="month" name="ipt6" id="ipt6"/><br /><br />
					7.周(星期)：<input type="week" name="ipt7" id="ipt7"/><br /><br />
					8.小时：<input type="time" name="ipt8" id="ipt8"/><br /><br />
					9.文本域：<input type="textarea" name="ipt9" id="ipt9"/><br /><br />
					10.上传文件：<input type="file" name="ipt10" id="ipt10"/><br /><br />
					11.批量上传文件：<input type="file" multiple name="ipt11" id="ipt11"/><br /><br />
					
				</div>
				<br />
				<button type="button" onclick="fn1()">
					获取ipt里的内容
				</button>
			</div>
		</div>
		
		<script type="text/javascript">
			function fn1(){
				var ipt1=document.getElementById("ipt1");
				var ipt1Value=ipt1.value;
				console.log("ipt1Value:",ipt1Value);
				
				var ipt2=document.getElementById("ipt2");
				var ipt2Value=ipt2.value;
				console.log("ipt2Value:",ipt2Value);
				
				var ipt3=document.getElementById("ipt3");
				var ipt3Value=ipt3.value;
				console.log("ipt3Value:",ipt3Value);
				
				var ipt4=document.getElementById("ipt4");
				var ipt4Value=ipt4.value;
				console.log("ipt4Value:",ipt4Value);
				
				var ipt5=document.getElementById("ipt5");
				var ipt5Value=ipt5.value;
				console.log("ipt5Value:",ipt5Value);
				
				var ipt6=document.getElementById("ipt6");
				var ipt6Value=ipt6.value;
				console.log("ipt6Value:",ipt6Value);
				
				var ipt7=document.getElementById("ipt7");
				var ipt7Value=ipt7.value;
				console.log("ipt7Value:",ipt7Value);
				
				var ipt8=document.getElementById("ipt8");
				var ipt8Value=ipt8.value;
				console.log("ipt8Value:",ipt8Value);
				
				var ipt9=document.getElementById("ipt9");
				var ipt9Value=ipt9.value;
				console.log("ipt9Value:",ipt8Value);
				
				var ipt10=document.getElementById("ipt10");
				var ipt10Value=ipt10.value;
				console.log("ipt10Value:",ipt10Value);
				
				var ipt11=document.getElementById("ipt11");
				var ipt11Value=ipt11.value;
				console.log("ipt11Value:",ipt11Value);
			}
//			var arr=[ipt1,ipt2,ipt3,ipt4,ipt5,ipt6,ipt7,ipt8,ipt9,ipt10,ipt11];
//			for (var i=0;i<arr.length;i++) {
//				var ipt=ipt+i;
//				fun(ipt)
//				function fun (ipt) {
//					var ipt=document.getElementById("ipt");
//					var iptValue=ipt.value;
//					console.log("ipt"+i+"Value:",ipt+i+Value);
//				}
//				
//			}
		</script>
	</body>
</html>
